package lesson01;

public class Demo05_Create {
    public static void main(String[] args) {
        Thread thread01 = new Thread(){
            @Override
            public void run() {
                System.out.println("通过匿名内部类创建线程");
            }
        };

        Thread thread02 = new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("通过Runble接口的匿名内部类创建线程");
            }
        });

        Thread thread03 = new Thread(() -> {
                System.out.println("通过Lambda表达式创建线程");
        });

        //启动线程
        thread01.start();
        thread02.start();
        thread03.start();

    }
}
